package com.liqw.auto.conditional;

import com.liqw.Constant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;

// ======================== 条件注解扩展 ========================
@Slf4j
public class CustomCondition implements Condition {

    @Override
    public boolean matches(ConditionContext ctx, AnnotatedTypeMetadata metadata) {
        System.out.println(Constant.getStepStr("CustomCondition.matches") + "CustomCondition @Conditional条件检测");
        return true; // 实际业务中根据条件返回
    }
}